﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="PrinterList.aspx.vb" Inherits="DirectoryWeb.PrinterList" CodePage="932" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>プリンターリスト</title>
</head>
<body>
  <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
      <table>
        <tr>
          <td>一覧</td>
          <td style="text-align:right"><asp:Label ID="CountLabel" runat="server"></asp:Label>
          </td>
          <td style="width:10px"></td>
          <td>詳細</td>
        </tr>
        <tr>
          <td colspan="2" style="vertical-align:top">
            <asp:UpdatePanel ID="PrinterUpdatePanel" runat="server" UpdateMode="Conditional" RenderMode="Inline">
              <ContentTemplate>
                <asp:ListBox ID="PrinterListBox" runat="server" AutoPostBack="True" Rows="16" 
                  TabIndex="1" DataSourceID="PrinterDataSource" DataTextField="Name" 
                  DataValueField="Name" Width="210px"></asp:ListBox>
                <asp:ObjectDataSource ID="PrinterDataSource" runat="server" 
                  OldValuesParameterFormatString="original_{0}" SelectMethod="GetPrintQueues" 
                  TypeName="Library.PrintQueue"></asp:ObjectDataSource>
              </ContentTemplate>
            </asp:UpdatePanel>
          </td>
          <td></td>
          <td style="vertical-align:top">
            <asp:UpdatePanel ID="DetailUpdatePanel" runat="server" UpdateMode="Conditional" RenderMode="Inline">
              <ContentTemplate>
                <asp:FormView ID="DetailFormView" runat="server" DataSourceID="DetailDataSource" Width="480px">
                  <ItemTemplate>
                    <table>
                      <tr style="height:25px">
                        <td style="width:75px">名前</td>
                        <td>
                            <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("FullName") %>'></asp:Label>
                        </td>
                      </tr>
                      <tr style="height:25px">
                        <td>サーバー</td>
                        <td>
                            <asp:Label ID="serverLabel" runat="server" Text='<%# Eval("ServerName") %>'></asp:Label>
                        </td>
                      </tr>
                      <tr style="height:25px">
                        <td>所属パス</td>
                        <td>
                          <asp:Label ID="DisplayPathLabel" runat="server" Text='<%# Eval("DisplayPath") %>'></asp:Label>
                        </td>
                      </tr>
                    </table>
                    <br />
                    <table>
                      <tr style="height:25px">
                        <td style="width:60px">場所</td>
                        <td>
                          <asp:TextBox ID="LocationTextBox" runat="server" TabIndex="6" 
                            MaxLength="64" Width="370px" Text='<%# Bind("Location") %>'></asp:TextBox>
                        </td>
                      </tr>
                      <tr style="height:25px">
                        <td>モデル</td>
                        <td>
                          <asp:TextBox ID="ModelTextBox" runat="server" TabIndex="7" 
                            MaxLength="64" Width="370px" Text='<%# Bind("Model")%>'></asp:TextBox>
                        </td>
                      </tr>
                      <tr style="height:25px">
                        <td>説明</td>
                        <td>
                          <asp:TextBox ID="DescriptionTextBox" runat="server" TabIndex="8" 
                            MaxLength="64" Width="370px" Text='<%# Bind("Description") %>'></asp:TextBox>
                        </td>
                      </tr>
                    </table>
                    <br />
                    <table>
                      <tr style="height:25px">
                        <td style="width:60px">
                          <asp:CheckBox ID="ColorCheckBox" runat="server" TabIndex="11" Text="色" Checked='<%# Bind("Color") %>' />
                        </td>
                        <td style="width:140px">
                          <asp:CheckBox ID="StaplingCheckBox" runat="server" TabIndex="12" Text="ホチキス止め" Checked='<%# Bind("Stapling") %>' />
                        </td>
                        <td colspan="2">
                          <asp:CheckBox ID="DuplexCheckBox" runat="server" TabIndex="13" Text="両面" Checked='<%# Bind("Duplex") %>' />
                        </td>
                      </tr>
                    </table>
                    <br />
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Inline">
                      <ContentTemplate>
                        <table>
                          <tr style="height:25px">
                            <td style="width:200px">印刷速度&nbsp;
                              <asp:TextBox ID="SpeedTextBox" runat="server" TabIndex="16" 
                                MaxLength="4" Width="40px" Text='<%# Bind("Speed") %>' AutoPostBack="True" OnTextChanged="TextBox_TextChanged"></asp:TextBox>&nbsp;ppm
                            </td>
                            <td>最高解像度&nbsp;
                              <asp:TextBox ID="ResolutionTextBox" runat="server" TabIndex="17" 
                                MaxLength="4" Width="40px" Text='<%# Bind("MaxResolution") %>' AutoPostBack="True" OnTextChanged="TextBox_TextChanged"></asp:TextBox>&nbsp;dpi
                            </td>
                          </tr>
                        </table>
                      </ContentTemplate>
                    </asp:UpdatePanel>
                  </ItemTemplate>
                  <EmptyDataTemplate>
                    <asp:Literal ID="Literal1" runat="server" Text="一覧からプリンターを選択してください。" EnableViewState="False"></asp:Literal>
                  </EmptyDataTemplate>
                </asp:FormView>
                <asp:ObjectDataSource ID="DetailDataSource" runat="server" 
                  OldValuesParameterFormatString="original_{0}" SelectMethod="FindByName" TypeName="Library.PrintQueue">
                  <SelectParameters>
                    <asp:ControlParameter ControlID="PrinterListBox" Name="name" PropertyName="SelectedValue" Type="String" />
                  </SelectParameters>
                </asp:ObjectDataSource>
              </ContentTemplate>
              <Triggers>
                <asp:AsyncPostBackTrigger ControlID="PrinterListBox" EventName="SelectedIndexChanged" />
              </Triggers>
            </asp:UpdatePanel>
          </td>
        </tr>
      </table>
      <asp:Button ID="Button1" runat="server" Text="戻る" TabIndex="51" />
    </div>
  </form>
</body>
</html>
